package com.myx.servlet;

import com.myx.pojo.News;
import com.myx.service.news.NewsService;
import com.myx.service.news.NewsServiceImpl;
import com.myx.tool.Constant;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "GetNewsListByTitleServlet")
public class GetNewsListByTitleServlet extends HttpServlet {
    NewsService newsService=new NewsServiceImpl();
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String title = request.getParameter("title");
        Integer currentPageNo=1;
        List<News> newsList= newsService.getNewsListPagesByTitle(title,currentPageNo, Constant.PAGE_SIZE);


    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
